package com.sea.supply.service.impl;


import com.aliyun.oss.OSSClient;
import com.aliyun.oss.model.ObjectMetadata;
import com.sea.physical.entity.CreateDistributeSku;
import com.sea.physical.entity.CreatePlan;
import com.sea.physical.service.CreateDistributeSkuService;
import com.sea.physical.service.CreatePlanService;
import com.sea.supply.entity.PdfFile;
import com.sea.supply.entity.PdfRead;
import com.sea.supply.mapper.PdfFileMapper;
import com.sea.supply.mapper.PdfMapper;
import com.sea.supply.service.PdfFileService;
import com.sea.supply.service.PdfService;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.PDPageTree;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.List;

/**
 * @author 陈鸿飞
 */
@Service
public class PdfFileServiceImpl implements PdfFileService {
    @Autowired
    private PdfFileMapper pdfFileMapper;

    @Override
    public int save(PdfFile pdfFile) {
        return pdfFileMapper.insert(pdfFile);
    }

    @Override
    public List<PdfFile> findByCreatePlanNo(String pdfPlanNo) {
        return pdfFileMapper.findByCreatePlanNo(pdfPlanNo);
    }

    @Override
    public List<PdfFile> findByCnd(PdfFile pdfFile) {
        return pdfFileMapper.findByCnd(pdfFile);
    }

    @Override
    public Integer deleteByPdfPlanNo(String pdfPlanNo) {
        return pdfFileMapper.deleteByPdfPlanNo(pdfPlanNo);
    }

    @Override
    public Integer clearPdfFile() {
        return pdfFileMapper.clearPdfFile();
    }

    @Override
    public List<PdfFile> getRows(Integer[] ids) {
        return pdfFileMapper.getRows(ids);
    }

}
